const mongoose=require('mongoose');

async function create(){
    let UserModel=mongoose.models['User'];
    for(let i=0;i<50;i++){
        let user=await UserModel.findOne({'weChat.openid':i.toString()});
        if(!user){
            await UserModel.weChatLogin({
                openid:i.toString(),
                token:i.toString(),
                nickname:'测试用户'+i,
                headimgurl:'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKVEyX2hqUPnshYEiarvhh1FtybiapVsBf4SY8ibJy8X6ial9LXUYkfLY0w5JicHHyOAFZUMS8g3zicibDvA/132',
                sex:1
            });
        }
    }
}

create();